// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_rules
// * CreateDate    : 2014-06-05 18:30:01
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:01
// * LastChanger   : 2014-06-05 18:30:01
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmRulesEntity : EntityBase
    {
        public HmRulesTable TableSchema
        {
            get
            {
                return HmRulesTable.Current;
            }
		}
		
		public HmRulesEntity()
        {

        }
		
		public HmRulesEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Ruleid = Convert.ToInt32(CommonFunctions.ToObject(dr["ruleid"]));
			this.Ruleaccountid = Convert.ToInt32(CommonFunctions.ToObject(dr["ruleaccountid"]));
			this.Rulename = Convert.ToString(CommonFunctions.ToObject(dr["rulename"]));
			this.Ruleactive = Convert.ToByte(CommonFunctions.ToObject(dr["ruleactive"]));
			this.Ruleuseand = Convert.ToByte(CommonFunctions.ToObject(dr["ruleuseand"]));
			this.Rulesortorder = Convert.ToInt32(CommonFunctions.ToObject(dr["rulesortorder"]));
        }
		
		public HmRulesEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Ruleid = Convert.ToInt32(CommonFunctions.ToObject(dr["ruleid"]));
			this.Ruleaccountid = Convert.ToInt32(CommonFunctions.ToObject(dr["ruleaccountid"]));
			this.Rulename = Convert.ToString(CommonFunctions.ToObject(dr["rulename"]));
			this.Ruleactive = Convert.ToByte(CommonFunctions.ToObject(dr["ruleactive"]));
			this.Ruleuseand = Convert.ToByte(CommonFunctions.ToObject(dr["ruleuseand"]));
			this.Rulesortorder = Convert.ToInt32(CommonFunctions.ToObject(dr["rulesortorder"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmRulesTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Ruleid
        {
            get { return Convert.ToInt32(GetData(HmRulesTable.C_ruleid)); }
            set { SetData(HmRulesTable.C_ruleid, value); }
        }
		
        [DataMember]
        public int Ruleaccountid
        {
            get { return Convert.ToInt32(GetData(HmRulesTable.C_ruleaccountid)); }
            set { SetData(HmRulesTable.C_ruleaccountid, value); }
        }
		
        [DataMember]
        public string Rulename
        {
            get { return Convert.ToString(GetData(HmRulesTable.C_rulename)); }
            set { SetData(HmRulesTable.C_rulename, value); }
        }
		
        [DataMember]
        public byte Ruleactive
        {
            get { return Convert.ToByte(GetData(HmRulesTable.C_ruleactive)); }
            set { SetData(HmRulesTable.C_ruleactive, value); }
        }
		
        [DataMember]
        public byte Ruleuseand
        {
            get { return Convert.ToByte(GetData(HmRulesTable.C_ruleuseand)); }
            set { SetData(HmRulesTable.C_ruleuseand, value); }
        }
		
        [DataMember]
        public int Rulesortorder
        {
            get { return Convert.ToInt32(GetData(HmRulesTable.C_rulesortorder)); }
            set { SetData(HmRulesTable.C_rulesortorder, value); }
        }
		
		#endregion
	}
	
	
}	

